package com.inspur.service.impl;

import com.inspur.bean.Category;
import com.inspur.dao.impl.CategoryDAOImpl;
import com.inspur.service.CategoryService;

import java.util.List;

/**
 * @Author：齐文勇
 * @Package：com.inspur.service.impl
 * @Project：ProductMS
 * @name：CategoryServiceImpl
 * @Date：2024/11/27 14:28
 * @Filename：CategoryServiceImpl
 */
public class CategoryServiceImpl implements CategoryService {
    @Override
    public boolean save(Category category) {
        return new CategoryDAOImpl().save(category)>0 ? true:false;
    }

    @Override
    public boolean deleteById(String id) {
        return new CategoryDAOImpl().deleteById(id)>0? true:false;
    }

    @Override
    public boolean updateById(Category category) {
        return new CategoryDAOImpl().updateById(category)>0? true :false;
    }

    @Override
    public List<Category> findAll() {
        return new CategoryDAOImpl().findAll();
    }

    @Override
    public Category findById(String id) {
        return new CategoryDAOImpl().findById(id);
    }
}
